Implementing coherency and page cache support for a storage system spread across multiple data centers

ABSTRACT

A plurality of computing devices are communicatively coupled to each other via a network, and each of the plurality of computing devices is operably coupled to one or more of a plurality of storage devices. The computing devices may use local caches and storing snapshots in a coherent manner when accessing the plurality of storage devices spread across multiple data centers.

PRIORITY CLAIM

This application claims priority to the following application, which ishereby incorporated herein by reference:

U.S. provisional patent application 62/702,387 titled “IMPLEMENTINGCOHERENCY AND PAGE CACHE SUPPORT FOR A STORAGE SYSTEM SPREAD ACROSSMULTIPLE DATA CENTERS” filed on Jul. 24, 2018.

BACKGROUND

Limitations and disadvantages of conventional approaches to data storagewill become apparent to one of skill in the art, through comparison ofsuch approaches with some aspects of the present method and system setforth in the remainder of this disclosure with reference to thedrawings.

INCORPORATION BY REFERENCE

U.S. patent application Ser. No. 15/243,519 titled “Distributed ErasureCoded Virtual File System” is hereby incorporated herein by reference inits entirety.

U.S. Patent Application No. 62/691,667 titled “Implementing Coherencyand Page Cache Support in a Distributed Way for Files” is herebyincorporated herein by reference in its entirety.

BRIEF SUMMARY

Methods and systems are provided for implementing coherency and pagecache support for a storage system spread across multiple data centerssubstantially as illustrated by and/or described in connection with atleast one of the figures, as set forth more completely in the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates various example configurations of a virtual filesystem in accordance with aspects of this disclosure.

FIG. 2 illustrates an example configuration of a virtual file systemnode in accordance with aspects of this disclosure.

FIG. 3 illustrates another representation of a virtual file system inaccordance with an example implementation of this disclosure.

FIG. 4A illustrates a user interface for a storage system in accordancewith an example implementation of this disclosure.

FIG. 4B illustrates a high level block diagram for multiple clusters ina storage system in accordance with an example implementation of thisdisclosure.

FIG. 5 illustrates a high level block diagram of an exampleconfiguration with cache memory in accordance with an exampleimplementation of this disclosure.

FIG. 6 illustrates an example flow diagram of taking a snapshot inaccordance with an example implementation of this disclosure.

FIG. 7 illustrates an example flow diagram of writing in a global filesystem in accordance with an example embodiment of this disclosure.

DETAILED DESCRIPTION

Traditionally, filesystems use a centralized control over the metadatastructure (e.g., directories, files, attributes, file contents). If alocal filesystem is accessible from a single server and that serverfails, the filesystem's data may be lost if as there is no furtherprotection. To add protection, some filesystems (e.g., as provided byNetApp) have used one or more pairs of controllers in an active-passivemanner to replicate the metadata across two or more computers. Othersolutions have used multiple metadata servers in a clustered way (e.g.,as provided by IBM GPFS, Dell EMC Isilon, Lustre, etc.). However,because the number of metadata servers in a traditional clustered systemis limited to small numbers, such systems are unable to scale.

The systems in this disclosure are applicable to small clusters and canalso scale to many, many thousands of nodes. An example embodiment isdiscussed regarding non-volatile memory (NVM), for example, flash memorythat comes in the form of a solid-state drive (SSD). The NVM may bedivided into 4 kB “blocks” and 128 MB “chunks.” “Extents” may be storedin volatile memory such as, for example, RAM, for fast access, and maybe backed up by NVM storage as well. An extent may store pointers forblocks, e.g., 256 pointers to 1 MB of data stored in blocks. In otherembodiments, larger or smaller memory divisions may also be used.Metadata functionality in this disclosure may be effectively spreadacross many servers. For example, in cases of “hot spots” where a largeload is targeted at a specific portion of the filesystem's namespace,this load can be distributed across a plurality of nodes.

FIG. 1 illustrates various example configurations of a virtual filesystem (VFS) in accordance with aspects of this disclosure. Shown inFIG. 1 is a local area network (LAN) 102 comprising one or more VFSnodes 120 (indexed by integers from 1 to J, for j≥1), and optionallycomprising (indicated by dashed lines): one or more dedicated storagenodes 106 (indexed by integers from 1 to M, for M≥1), one or morecompute nodes 104 (indexed by integers from 1 to N, for N≥1), and/or anedge router that connects the LAN 102 to a remote network 118. Theremote network 118 optionally comprises one or more storage services 114(indexed by integers from 1 to K, for K≥1), and/or one or more dedicatedstorage nodes 115 (indexed by integers from 1 to L, for L≥1).

Each VFS node 120 _(j) (j an integer, where 1≤j≤J) is a networkedcomputing device (e.g., a server, personal computer, or the like) thatcomprises circuitry for running VFS processes and, optionally, clientprocesses (either directly on an operating system of the device 104 _(n)and/or in one or more virtual machines running in the device 104 _(n)).

The compute nodes 104 are networked devices that may run a VFS frontendwithout a VFS backend. A compute node 104 may run VFS frontend by takingan SR-IOV into the NIC and consuming a complete processor core.Alternatively, the compute node 104 may run the VFS frontend by routingthe networking through a Linux kernel networking stack and using kernelprocess scheduling, thus not having the requirement of a full core. Thisis useful if a user does not want to allocate a complete core for theVFS or if the networking hardware is incompatible with the VFSrequirements.

FIG. 2 illustrates an example configuration of a VFS node in accordancewith aspects of this disclosure. A VFS node comprises a VFS frontend 202and driver 208, a VFS memory controller 204, a VFS backend 206, and aVFS SSD agent 214. As used in this disclosure, a “VFS process” is aprocess that implements one or more of: the VFS frontend 202, the VFSmemory controller 204, the VFS backend 206, and the VFS SSD agent 214.Thus, in an example implementation, resources (e.g., processing andmemory resources) of the VFS node may be shared among client processesand VFS processes. The processes of the VFS may be configured to demandrelatively small amounts of the resources to minimize the impact on theperformance of the client applications. The VFS frontend 202, the VFSmemory controller 204, and/or the VFS backend 206 and/or the VFS SSDagent 214 may run on a processor of the host 201 or on a processor ofthe network adaptor 218. For a multi-core processor, different VFSprocess may run on different cores, and may run a different subset ofthe services. From the perspective of the client process(es) 212, theinterface with the virtual file system is independent of the particularphysical machine(s) on which the VFS process(es) are running. Clientprocesses only require driver 208 and frontend 202 to be present inorder to serve them.

The VFS node may be implemented as a single tenant server (e.g.,bare-metal) running directly on an operating system or as a virtualmachine (VM) and/or container (e.g., a Linux container (LXC)) within abare-metal server. The VFS may run within an LXC container as a VMenvironment. Thus, inside the VM, the only thing that may run is the LXCcontainer comprising the VFS. In a classic bare-metal environment, thereare user-space applications and the VFS runs in an LXC container. If theserver is running other containerized applications, the VFS may runinside an LXC container that is outside the management scope of thecontainer deployment environment (e.g. Docker).

The VFS node may be serviced by an operating system and/or a virtualmachine monitor (VMM) (e.g., a hypervisor). The VMM may be used tocreate and run the VFS node on a host 201. Multiple cores may resideinside the single LXC container running the VFS, and the VFS may run ona single host 201 using a single Linux kernel. Therefore, a single host201 may comprise multiple VFS frontends 202, multiple VFS memorycontrollers 204, multiple VFS backends 206, and/or one or more VFSdrivers 208. A VFS driver 208 may run in kernel space outside the scopeof the LXC container.

A single root input/output virtualization (SR-IOV) PCIe virtual functionmay be used to run the networking stack 210 in user space 222. SR-IOVallows the isolation of PCI Express, such that a single physical PCIExpress can be shared on a virtual environment and different virtualfunctions may be offered to different virtual components on a singlephysical server machine. The I/O stack 210 enables the VFS node tobypasses the standard TCP/IP stack 220 and communicate directly with thenetwork adapter 218. A Portable Operating System Interface for uniX(POSIX) VFS functionality may be provided through lockless queues to theVFS driver 208. SR-IOV or full PCIe physical function address may alsobe used to run non-volatile memory express (NVMe) driver 214 in userspace 222, thus bypassing the Linux IO stack completely. NVMe may beused to access non-volatile storage device 216 attached via a PCIExpress (PCIe) bus. The non-volatile storage device 216 may be, forexample, flash memory that comes in the form of a solid-state drive(SSD) or Storage Class Memory (SCM) that may come in the form of an SSDor a memory module (DIMM). Other example may include storage classmemory technologies such as 3D-XPoint.

The SSD may be implemented as a networked device by coupling thephysical SSD, for example, the non-volatile storage device 216, with theSSD agent 214 and networking 210. Alternatively, the SSD may beimplemented as a network-attached NVMe SSD 242 or 244 by using a networkprotocol such as NVMe-oF (NVMe over Fabrics). NVMe-oF may allow accessto the NVMe device using redundant network links, thereby providing ahigher level or resiliency. Network adapters 226, 228, 230 and 232 maycomprise hardware acceleration for connection to the NVMe SSD 242 and244 to transform them into networked NVMe-oF devices without the use ofa server. The NVMe SSDs 242 and 244 may each comprise two physicalports, and all the data may be accessed through either of these ports.

Each client process/application 212 may run directly on an operatingsystem or may run in a virtual machine and/or container serviced by theoperating system and/or hypervisor. A client process 212 may read datafrom storage and/or write data to storage in the course of performingits primary function. The primary function of a client process 212,however, is not storage-related (i.e., the process is only concernedthat its data is reliably stored and is retrievable when needed, and notconcerned with where, when, or how the data is stored). Exampleapplications which give rise to such processes include: email servers,web servers, office productivity applications, customer relationshipmanagement (CRM), animated video rendering, genomics calculation, chipdesign, software builds, and enterprise resource planning (ERP).

A client application 212 may make a system call to the kernel 224 whichcommunicates with the VFS driver 208. The VFS driver 208 puts acorresponding request on a queue of the VFS frontend 202. If several VFSfrontends exist, the driver may load balance accesses to the differentfrontends, making sure a single file/directory is always accessed viathe same frontend. This may be done by “sharding” the frontend based onthe ID of the file or directory. The VFS frontend 202 provides aninterface for routing file system requests to an appropriate VFS backendbased on the bucket that is responsible for that operation. Theappropriate VFS backend may be on the same host or it may be on anotherhost.

The VFS backend 206 hosts several buckets, each one of them services thefile system requests that it receives and carries out tasks to otherwisemanage the virtual file system (e.g., load balancing, journaling,maintaining metadata, caching, moving of data between tiers, removingstale data, correcting corrupted data, etc.)

The VFS SSD agent 214 handles interactions with a respectivenon-volatile storage device 216. This may include, for example,translating addresses, and generating the commands that are issued tothe storage device (e.g., on a SATA, SAS, PCIe, or other suitable bus).Thus, the VFS SSD agent 214 operates as an intermediary between anon-volatile storage device 216 and the VFS backend 206 of the virtualfile system. The SSD agent 214 could also communicate with a standardnetwork storage device supporting a standard protocol such as NVMe-oF(NVMe over Fabrics).

FIG. 3 illustrates another representation of a virtual file system inaccordance with an example implementation of this disclosure. In FIG. 3,the element 302 represents memory resources (e.g., DRAM and/or othershort-term memory) and processing (e.g., x86 processor(s), ARMprocessor(s), NICs, ASICs, FPGAs, and/or the like) resources of variousnode(s) (compute, storage, and/or VFS) on which resides a virtual filesystem, such as described regarding FIG. 2 above. The element 308represents the one or more physical non-volatile storage devices 216which provide the long term storage of the virtual file system.

As shown in FIG. 3, the physical storage is organized into a pluralityof distributed failure resilient address spaces (DFRASs) 318. Each ofwhich comprises a plurality of chunks 310, which in turn comprises aplurality of blocks 312. The organization of blocks 312 into chunks 310is only a convenience in some implementations and may not be done in allimplementations. Each block 312 stores committed data 316 (which maytake on various states, discussed below) and/or metadata 314 thatdescribes or references committed data 316.

The organization of the storage 308 into a plurality of DFRASs enableshigh performance parallel commits from many—perhaps all—of the nodes ofthe virtual file system (e.g., all nodes 104 ₁-104 _(N), 106 ₁-106 _(M),and 120 ₁-120 _(J) of FIG. 1 may perform concurrent commits inparallel). In an example implementation, each of the nodes of thevirtual file system may own a respective one or more of the plurality ofDFRAS and have exclusive read/commit access to the DFRASs that it owns.

Each bucket owns a DFRAS, and thus does not need to coordinate with anyother node when writing to it. Each bucket may build stripes across manydifferent chunks on many different SSDs, thus each bucket with its DFRAScan choose what “chunk stripe” to write to currently based on manyparameters, and there is no coordination required in order to do so oncethe chunks are allocated to that bucket. All buckets can effectivelywrite to all SSDs without any need to coordinate.

Each DFRAS being owned and accessible by only its owner bucket that runson a specific node allows each of the nodes of the VFS to control aportion of the storage 308 without having to coordinate with any othernodes (except during [re] assignment of the buckets holding the DFRASsduring initialization or after a node failure, for example, which may beperformed asynchronously to actual reads/commits to storage 308). Thus,in such an implementation, each node may read/commit to its buckets'DFRASs independently of what the other nodes are doing, with norequirement to reach any consensus when reading and committing tostorage 308. Furthermore, in the event of a failure of a particularnode, the fact the particular node owns a plurality of buckets permitsmore intelligent and efficient redistribution of its workload to othernodes (rather the whole workload having to be assigned to a single node,which may create a “hot spot”). In this regard, in some implementationsthe number of buckets may be large relative to the number of nodes inthe system such that any one bucket may be a relatively small load toplace on another node. This permits fine grained redistribution of theload of a failed node according to the capabilities and capacity of theother nodes (e.g., nodes with more capabilities and capacity may begiven a higher percentage of the failed nodes buckets).

To permit such operation, metadata may be maintained that maps eachbucket to its current owning node such that reads and commits to storage308 can be redirected to the appropriate node.

Load distribution is possible because the entire filesystem metadataspace (e.g., directory, file attributes, content range in the file,etc.) can be broken (e.g., chopped or sharded) into small, uniformpieces (e.g., “shards”). For example, a large system with 30 k serverscould chop the metadata space into 128 k or 256 k shards.

Each such metadata shard may be maintained in a “bucket.” Each VFS nodemay have responsibility over several buckets. When a bucket is servingmetadata shards on a given backend, the bucket is considered “active” orthe “leader” of that bucket. Typically, there are many more buckets thanVFS nodes. For example, a small system with 6 nodes could have 120buckets, and a larger system with 1,000 nodes could have 8 k buckets.

Each bucket may be active on a small set of nodes, typically 5 nodesthat that form a penta-group for that bucket. The cluster configurationkeeps all participating nodes up-to-date regarding the penta-groupassignment for each bucket.

Each penta-group monitors itself. For example, if the cluster has 10 kservers, and each server has 6 buckets, each server will only need totalk with 30 different servers to maintain the status of its buckets (6buckets will have 6 penta-groups, so 6*5=30). This is a much smallernumber than if a centralized entity had to monitor all nodes and keep acluster-wide state. The use of penta-groups allows performance to scalewith bigger clusters, as nodes do not perform more work when the clustersize increases. This could pose a disadvantage that in a “dumb” mode asmall cluster could actually generate more communication than there arephysical nodes, but this disadvantage is overcome by sending just asingle heartbeat between two servers with all the buckets they share (asthe cluster grows this will change to just one bucket, but if you have asmall 5 server cluster then it will just include all the buckets in allmessages and each server will just talk with the other 4). Thepenta-groups may decide (i.e., reach consensus) using an algorithm thatresembles the Raft consensus algorithm.

Each bucket may have a group of compute nodes that can run it. Forexample, five VFS nodes can run one bucket. However, only one of thenodes in the group is the controller/leader at any given moment.Further, no two buckets share the same group, for large enough clusters.If there are only 5 or 6 nodes in the cluster, most buckets may sharebackends. In a reasonably large cluster there many distinct node groups.For example, with 26 nodes, there are more than 64,000

$\left( \frac{26!}{{5!}*{\left( {26 - 5} \right)!}} \right)$

possible five-node groups (i.e., penta-groups).

All nodes in a group know and agree (i.e., reach consensus) on whichnode is the actual active controller (i.e., leader) of that bucket. Anode accessing the bucket may remember (“cache”) the last node that wasthe leader for that bucket out of the (e.g., five) members of a group.If it accesses the bucket leader, the bucket leader performs therequested operation. If it accesses a node that is not the currentleader, that node indicates the leader to “redirect” the access. Ifthere is a timeout accessing the cached leader node, the contacting nodemay try a different node of the same penta-group. All the nodes in thecluster share common “configuration” of the cluster, which allows thenodes to know which server may run each bucket.

Each bucket may have a load/usage value that indicates how heavily thebucket is being used by applications running on the filesystem. Forexample, a server node with 11 lightly used buckets may receive anotherbucket of metadata to run before a server with 9 heavily used buckets,even though there will be an imbalance in the number of buckets used.Load value may be determined according to average response latencies,number of concurrently run operations, memory consumed or other metrics.

Redistribution may also occur even when a VFS node does not fail. If thesystem identifies that one node is busier than the others based on thetracked load metrics, the system can move (i.e., “fail over”) one of itsbuckets to another server that is less busy. However, before actuallyrelocating a bucket to a different host, load balancing may be achievedby diverting writes and reads. Because each write may end up on adifferent group of nodes, decided by the DFRAS, a node with a higherload may not be selected to be in a stripe to which data is beingwritten. The system may also opt to not serve reads from a highly loadednode. For example, a “degraded mode read” may be performed, wherein ablock in the highly loaded node is reconstructed from the other blocksof the same stripe. A degraded mode read is a read that is performed viathe rest of the nodes in the same stripe, and the data is reconstructedvia the failure protection. A degraded mode read may be performed whenthe read latency is too high, as the initiator of the read may assumethat that node is down. If the load is high enough to create higher readlatencies, the cluster may revert to reading that data from the othernodes and reconstructing the needed data using the degraded mode read.

Each bucket manages its own distributed erasure coding instance (i.e.,DFRAS 318) and does not need to cooperate with other buckets to performread or write operations. There are potentially thousands of concurrent,distributed erasure coding instances working concurrently, each for thedifferent bucket. This is an integral part of scaling performance, as iteffectively allows any large filesystem to be divided into independentpieces that do not need to be coordinated, thus providing highperformance regardless of the scale.

Each bucket handles all the file systems operations that fall into itsshard. For example, the directory structure, file attributes, and filedata ranges will fall into a particular bucket's jurisdiction.

An operation done from any frontend starts by finding out what bucketowns that operation. Then the backend leader, and the node, for thatbucket is determined. This determination may be performed by trying thelast-known leader. If the last-known leader is not the current leader,that node may know which node is the current leader. If the last-knownleader is not part of the bucket's penta-group anymore, that backendwill let the front end know that it should go back to the configurationto find a member of the bucket's penta-group. The distribution ofoperations allows complex operations to be handled by a plurality ofservers, rather than by a single computer in a standard system.

If the cluster of size is small (e.g., 5) and penta-groups are used,there will be buckets that share the same group. As the cluster sizegrows, buckets are redistributed such that no two groups are identical.

FIG. 4A illustrates a user interface for an example host of a storagesystem in accordance with an example implementation of this disclosure.Referring to FIG. 4A, there is shown a host 400 communicatively coupled,either wired or wirelessly, to the user interface 410. The host 400 maybe similar to the host 201. The host 400 may also have, for example, aninput/output (I/O) interface 402 that allows communication with the userinterface 410. The I/O interface 402 may also comprise one or more inputdevices such as, for example, a mouse, a trackball, a keyboard, buttons,a touch panel or screen, etc. that allows a user to enter information.The I/O interface 402 may also have one or more output devices such as,for example, lights/LEDs, a speaker, a display, etc. that allows a userto see or hear various outputs. Accordingly, the host 400 may have adisplay 404. The host 400 may also have, for example, a transceiver 406that may be suitable for communicating with another electronic devicevia one or more wired protocols and/or one or more wireless protocols.Wired protocols may be, for example, USB, Firewire, SCSI, etc. Wirelessprotocols may be, for example, a cellular protocol, WiFi, Bluetooth, NFC(Near Field Communication), etc.

Accordingly, the I/O stack 210, the TCP/IP stack 220, and/or the networkadaptor 218 may be thought of as being a part of the I/O interface 402.The I/O interface 402 may be a logical grouping of input/output devicesand applicable software.

Various embodiments may also communicate with the user interface 410,which may be similar to the I/O interface 402.

Depending on the application software, the user interface 410 and/or theI/O interface 402 may be used to access information, status, etc. forany level of the storage system. For example, the access may be to aspecific node, a file system, the entire storage system, etc. Therefore,for a distributed storage system that may have several clusters, or datacenters, there may be a storage system management system that allowsoverall view and control of the storage system. There may also be acluster management system that may present a view and control of anindividual cluster (data center). There may be other management systemsthat allow granular control for the cluster. These may comprise, forexample, bucket level management system, node level management system,etc. Various embodiments of the disclosure may have these managementsystems available via the user interface 410 and/or the I/O interface402. Some embodiments may have some or all management systems availablevia specific management nodes with its user interface 410 and/or I/Ointerface 402.

The various management systems may use one or more processors such asthose previously described or have their own dedicated processors. Forthe sake of brevity, the various management systems may be referred toas a “management system.” There may be occasions when a local event inone cluster may result in actions from one or more other clusters. Forexample, a write from a first cluster to a second cluster may result inactions in the second cluster, as well as possibly in other clusters.For ease of description, a high level view describes the actions asbeing taken by the local cluster rather than actions taken by the localcluster and actions taken by the remote clusters in response to actionsby the local cluster. The term “remote” may refer to an entity that isin another cluster (data center). Similarly, actions described as beingtaken by a local processor may include actions taken by remoteprocessor(s) due to the actions of the local processor.

A storage system may be created such that at any given moment one activecluster (or data center) out of several clusters may control changingdata, and the other clusters may have read-only views as inactiveclusters. Because there may not be any coordination between the activecluster and the inactive clusters, the read-only view for the inactiveclusters may comprise outdated data. To have better access to the datacontrolled by the active cluster, one method may redirect clients to theactive cluster. However, this may result in longer latency.

In some cases, users from the different data centers may want to work onthe same file system view without actual sharing of data. The users mayalso want local access latencies on the data that is accessed locally.In such cases, a “global file system” may be created for running theseveral clusters.

FIG. 4B illustrates a high level block diagram for multiple clusters ina storage system in accordance with an example implementation of thisdisclosure. Referring to FIG. 4B, there are shown the storage system 420and the cloud 440. The storage system 420 may comprise three clusters430, 432, and 434 that may communicate with each other via the cloud440. The clusters 430, 432, and 434 are shown as each having a pluralityof nodes Node1 to NodeN. However, the number of nodes for each clusterneed not be the same. The nodes Node1 to NodeN may be any type of nodesshown previously. For example, any one of the Node1 to NodeN may be acompute node 104, a VFS node 120, a storage node 106, 115. Any one ofthe Node1 to NodeN may also be a dedicated management node.

The cloud 440 may describe a mode of communication from one cluster toanother. Accordingly, the cloud 440 may comprise the various devicesthat may allow two devices to communicate with each other. For example,the cloud 440 may comprise the Internet, cellular system(s), WiFinetwork(s), etc. that may be used individually or together to allowcommunication between two or more devices.

There may be various reasons for having multiple clusters of nodes inthe storage system 420. An example may be when the clusters are situatedapproximately 8 hours apart so that development may occur around theclock. Another example may be to separate the clusters geographically toprovide additional safety factor for the different, or the same, datathat may be in the clusters 430, 432, 434. A global file system may alsouse multiple clusters.

While three clusters 430, 432, and 444 are shown, an embodiment of thedisclosure need not be limited to three clusters. There may be fewerclusters or more clusters in a storage system. Accordingly, any of theclusters 430, 432, or 434 may be a storage system by itself.

While a global FS configuration may be useful in some instances, it mayhave increased network cost due to the requirement to have low-latencynetwork between the data centers because there may be much morecommunication on the network to reach a decision about what file will bemanaged by which cluster. Accordingly, a cheaper way to operate a globalFS may be desirable.

The clusters in a global FS may have the same metadata view of the filesystem, but each cluster may manage its own buckets. Accordingly, thecluster sizes may be different. The IDs of the objects may stay the sameso that the same file/directory/etc. may share the same ID for thevarious clusters. However, due to different number of buckets, theobjects may be sharded into different bucket IDs. The discrepancy in thebuckets may be due to, for example, physical differences in the clustersof nodes. For example, different nodes may be out of service for thedifferent clusters. Or, within a node, different hardware devices, suchas, for example, different storage devices, may be out of service.Furthermore, there may be network outages or power failures, eitherblackouts or brown-outs, which may affect operation of the variousnodes.

However, regardless of the differences in sharding to buckets, eachfront end (FE) may have a view of all the buckets and SSD agents of allthe clusters, with the knowledge of what buckets and SSD agents belongto which cluster. Accordingly, an FE may be able to send an IO requestto a remote bucket, or a leasing request. To reduce latency, an FE maycache data for read and/or write operations until the cache needs to beupdated by either writing to object storage and/or refreshing the readcache.

Accordingly, optimizations to allow caching in local RAM of the computermay allow faster and more operations locally with no need to access theactual storage system until needed. Depending on a configuration, a“local” RAM may be directly accessible to a computer, or accessed via alocal network where the access times to the RAM can be controlled byconfiguring the local network to acceptable performance. Variousembodiments may allow this to happen and still present sharable coherentstorage to the end user by implementing, for example, “leases” forfiles.

A file lease may be, for example, a shared token between a backend, suchas, for example, the VFS backend (BE) 206, and a frontend, such as, forexample, a VFS frontend (FE) 202. The shared token may signal, forexample, that a certain FE is using a certain file. In variousembodiments, a lease may be given for an entire file, while otherembodiments may give a lease for a portion of a file.

A lease holder may be an FE in a cluster that holds a lease for all thefile users that are accessing the system through it. A cluster usagepattern may describe the properties of the group of lease holders, forexample, FEs, that own a lease for a given file.

A lease may have associated with it a lease capability that may describewhat the lease holder, for example, a FE, can do with the fileassociated with the lease. For example, the lease capability may giveread and/or write permission to the file. There may also be a capabilitythat limits each FE to a certain range of the file. This may be useful,for example, when multiple FEs have leases to the same file. The leasemay also denote cache capability. For example, a lease may not allow anycaching, or a combination of read and/or write caching.

A more detailed description of a lease, including various scenarios forrequesting, renewing, and revoking a lease, is provided by theprovisional application 62/691,667, the contents of which areincorporated herein by reference.

FIG. 5 illustrates a high level block diagram of an exampleconfiguration with cache memory in accordance with an exampleimplementation of this disclosure. Referring to FIG. 5, there are shownfrontends (FEs) 502, 504, cache memory 510, and a backend (BE) 520. Thecache memory 510 may be, for example, a RAM (random access memory) suchas an SRAM (static RAM) or DRAM (dynamic RAM), or another type of memorythat has acceptable read and write times. The specific type of memoryused may depend on, for example, access speed needed, cost constraints,etc.

The cache memory 510 may comprise a read cache 512 and a write cache514. The BE 510 may have associated with it a storage device 530 thatmay be similar to the storage device 216 or the NVMe SSD 242, 244.

The FEs 502 and 504 may be similar to, for example, the VFS Frontend202, and the BE 520 may be similar to, for example, the VFS Backend 206.The read cache 512 and the write cache 514 may be local to, for example,both of the FEs 502, 504, or each of the FEs 502 and 504 may have theirrespective local read cache 512 and local write cache 514. The storagedevice 530 may be locally attached to, for example, the BE 520 as thestorage device 216 is locally attached to the SSD agent 214, or networkattached to the FEs 502, 504 and the BE 520 as the NVMe SSD 242, 244 isnetwork attached to the VFS Frontend 202 and the VFS Backend 206.

Prior to performing a memory access to the storage device 530, the FEs502 and 504 may acquire a lease from the BE 520. However, in a global FSconfiguration, when opening a file, instead of requesting a lease fromthe local cluster, a lease may be requested from all known clusters. Thelease request may be managed by, for example, a storage system interfacethat may provide system wide management. The system storage interfacemay be provided via, for example, the I/O interface 402 or the userinterface 410.

Various embodiments of the storage system may allow taking a snapshotby, for example, the FE 502 to save a data set at a particular point intime. The snapshot may comprise, for example, differential informationwith respect to a previous snapshot or an image. The storage system mayallow snapshots at a file system level for a group of data storagedevices such as, for example, a bucket level. The snapshots may then besaved to the backend object storage such as, for example, the BE 530such that the backend object storage stores a complete copy of the filesystem in a way that it may be read and used from a completely differentcluster (data center). Accordingly, the state of the registry may needto be recovered on the new system with all inodes and extents that willstore all the structure of the system. The process of saving thesnapshot to the backend object storage may be referred to as, forexample, snapshot to object storage. The backend object storage may besimilar to, for example, the storage device 216, 222, 230, 308, or 530.

When the snapshot data is managed at the bucket level, the snapshotworkload may be shared across all buckets. Therefore, each bucket maymanage all the snapshots for all its managed objects such as, forexample, directories, inodes, file data ranges, etc. A processor, suchas, for example, a processor of the host 201 or a processor of thenetwork adaptor 218, or any other processor that may be appropriate asshown on FIGS. 1 and 2, may be used for managing the snapshots,including storing the snapshots to backend object storage, etc. Forexample, the snapshot management may be performed by the leader of abucket. The snapshot management may be visible to a user via, forexample, the user interface 410 or the I/O interface 402.

Each cluster may have its own “local” object storage backend fortiering, and it may tier individually to that object storage. Since thestate of one cluster may be the same as the states of the otherclusters, it may not matter to the storage system whether there is justone object storage or several object storages at each cluster, orwhether one of the clusters may actually write to a compound objectstorage.

Each cluster may be able to individually save snapshots to backendobject storage since the cluster knows the object storages it manages.The saving process may be referred to as snapshot to object storage.

FIG. 6 illustrates an example flow diagram of taking a snapshot inaccordance with an example implementation of this disclosure. Referringto FIG. 6, there is shown a flow diagram 600 comprising blocks 602 to612 for snapshots in a global file system.

At block 602, a snapshot may be started. The snapshot may be takenperiodically, at certain times, or at the discretion of the user. Thesnapshot may also be taken as determined by the storage system, or asdetermined by some subunits of the storage system.

At block 604, IO processes may be stopped across all clusters. At block606, snapshot commands may be sent to all clusters so that the states ofthe various clusters may be kept coherent. At block 608, dirty extentsmay be distributed to the other clusters so that they may have thesnapshot information. This may allow all clusters to log changes inother clusters to their local ODHs that log the snapshot operations.

At block 610, before a snapshot to object storage process starts, theclusters may verify that no other remote bucket holds any dirty clusterinformation that is associated with an extent of such a snapshot. Atblock 612, when all local extents are up-to-date regarding thatsnapshot, the snapshot to object storage may be performed.

With regard to the global file system, different behaviors may occurdepending on the shared usage of the files. For example, in a firstscenario, there may not be conflicting file accesses among the clusters.That is, a lease request may not conflict with an active lease on theremote clusters. Accordingly, the cluster may use the data as if it werethe only one accessing it.

In a second scenario, file accesses may be shared across the clusters,but only for reads. Reads may be served locally such that all FEs mayhave only a read lease for a particular file. In a third scenario, fileaccesses may be shared for read, but a subset of the files may still bemarked dirty, or changed, by one cluster.

In a fourth scenario, file accesses may be shared for write across thedifferent clusters but only one cluster may actively write to a file.The active cluster may be picked by the storage system by consideringone or more criteria such as, for example, which cluster opened first,which cluster has more opened files, etc. In some cases, all the dirtyextents may be copied to a more optimized cluster and then work maycontinue. Accordingly, all the FEs from all the clusters may be able toroute their reads and writes to the BEs on the correct clusters.

While the fourth scenario may result in IOs being diverted to the otherclusters, the IOs are routed automatically so there may not be a need tochange anything on the application side. Also, as the accesses to theother clusters are made on a per-file basis as needed, this may provideoptimized use of the storage system over several clusters (datacenters), where nodes at each cluster may have performance close tolocal performance.

The storage management system may also provide monitoring information(via CLI, API, GUI, etc.) to show the files that may be under to allowthe users to profile its use and, as needed, alter the application in away that it shares less files across clusters. A file may be undercontention when contention writes are requested to it from multipleclusters.

However, when writes occur, the lease mechanism may mark a list of dirtyextents, or extents that have changed, that need to be sent to theremote clusters so they have the same view of the data. The extent maybe kept in an on-disk hash (ODH). This may be similar to the way ODH isused to keep track of the snapshot data/metadata changes. As abackground process, after each file is closed, the cluster managementsystem may go over the extents in these files, and copy them to theother clusters, so they may be read locally if needed.

The files that are marked dirty, which were opened for writes byexclusively one cluster, may be blocked for access until all the extentsare copied to the remote clusters.

FIG. 7 illustrates an example flow diagram of writing in a global filesystem in accordance with an example embodiment of this disclosure.Referring to FIG. 7, there is shown a flow diagram 700 with blocks 702to 712. At block 702, a write process may start with a lease to theappropriate file(s). At block 704, after acquiring the lease, writes maybe performed to the file(s). At block 706, the file(s) may be closedbecause access may not be needed any more, or the present lease holdermay need to relinquish the lease due to time multiplexing, request froma higher priority device, etc. At block 708, access to the closedfile(s) may be blocked for all clusters. At block 710, dirty extents forthe file(s) may be transmitted to all clusters, and at block 712, allclusters may update their extents. Accordingly, all clusters may haveaccurate information regarding the file(s) in the first cluster thatwere recently written to by a second cluster.

While FIGS. 6 and 7 described specific flow diagrams, variousembodiments may use other flow diagrams without deviating from thedisclosure of the various embodiments.

Therefore, it can be seen that an implementation of the disclosure maybe a method for using a distributed storage system, where the methodcomprises managing data in a plurality of clusters, where each of theplurality of clusters comprises buckets, and each of the buckets isdistributed across a plurality of storage nodes. The method may alsoinclude transferring data to or from each of the buckets using at leastone processor of a plurality of processors, where each of the pluralityof processors is configured to manage data transfer to or from each ofthe buckets. Each of the buckets may be distributed across five storagenodes.

The method may also include taking a snapshot by a first processor ofthe plurality of processors, in a first cluster of the plurality ofclusters, of a first bucket of the first cluster of the plurality ofclusters. Prior to the first processor taking the snapshot, datatransfer to all storage nodes in the plurality of clusters may behalted. Taking a snapshot may then comprise sending a command to take asnapshot to the plurality of clusters. After the snapshot is taken,dirty extents regarding the snapshot may be distributed to the otherclusters. The dirty extents may include information regarding thesnapshot, and this may be sent to other clusters of the plurality ofclusters, where the information can be logged by the other clusters tokeep track of the snapshot. The snapshot may be stored by the firstprocessor to one or more storage nodes of the plurality of storage nodesin the first cluster. The one or more storage nodes may be associatedwith the first bucket, and the first bucket may be managed by the firstprocessor.

Prior to storing the snapshot, the first processor may verify that noother bucket in any of the plurality of clusters holds any dirty clusterinformation associated with an extent of the snapshot.

The method may also comprise, when writing by a first processor of theplurality of processors in a first cluster to a second cluster in theplurality of clusters, sending extents affected by the write to otherclusters of the plurality of clusters to provide a coherent view to allclusters of the plurality of clusters.

The method may comprise, for example, prior to transferring the data toone of the buckets, requesting by a first processor of the plurality ofprocessors, in a first cluster of the plurality of clusters, a lease toopen a file in a first bucket of the buckets for at least writeprivilege for the file. A first processor of the plurality ofprocessors, in a first cluster of the plurality of clusters, may requesta lease to open a file in a first bucket of the plurality of buckets.The first processor may additionally request a respective lease fromeach of the plurality of clusters to open a file in a second cluster ofthe plurality of clusters.

The method may also comprise relinquishing the lease to close the openfile, and transmitting extents associated with the closed file to otherclusters of the plurality of clusters. Each of the other clusters maythen update their extents with the transmitted extents such that theclosed file can be read locally. The transmitting may be done in thebackground. Access to the closed file may be blocked until thetransmitting is done.

When there is a lease request from more than one cluster, a cluster toprovide the lease to may be selected based on one or both of: the firstlease request and the number of opened files by each of the plurality ofclusters

Additionally, another implementation of the disclosure may be adistributed storage system comprising a plurality of clusters, whereeach of the plurality of clusters may comprise buckets, and each of thebuckets is distributed across a plurality of storage nodes. Thedistributed storage system may include a plurality of processors in eachof the clusters, where each of the plurality of processors may beconfigured to manage data transfer to or from each of the buckets. Eachof the buckets may be distributed across five storage nodes. A firstprocessor of the plurality of processors, in a first cluster of theplurality of clusters, may be configured to request a lease to transferdata to a first bucket of the plurality of buckets.

A first processor of the plurality of processors, in a first cluster ofthe plurality of clusters, may be configured to request a lease fromeach of the plurality of clusters to transfer data from a first bucketin the first cluster to a second bucket in a second cluster of theplurality of clusters.

A first processor of the plurality of processors, in a first cluster ofthe plurality of clusters, may be configured to take a snapshot of afirst bucket of the first cluster. The first processor is configured tostore the snapshot to one or more storage nodes of the plurality ofstorage nodes in the first cluster. The one or more storage nodes may beassociated with the first bucket. Prior to the first processor takingthe snapshot, data transfer may be halted to all storage nodes in theplurality of clusters.

While the present method and/or system has been described with referenceto certain implementations, it will be understood by those skilled inthe art that various changes may be made and equivalents may besubstituted without departing from the scope of the present methodand/or system. In addition, many modifications may be made to adapt aparticular situation or material to the teachings of the presentdisclosure without departing from its scope. Therefore, it is intendedthat the present method and/or system not be limited to the particularimplementations disclosed, but that the present method and/or systemwill include all implementations falling within the scope of theappended claims.

As utilized herein the terms “circuits” and “circuitry” refer tophysical electronic components (i.e. hardware) and any software and/orfirmware (“code”) which may configure the hardware, be executed by thehardware, and or otherwise be associated with the hardware. As usedherein, for example, a particular processor and memory may comprisefirst “circuitry” when executing a first one or more lines of code andmay comprise second “circuitry” when executing a second one or morelines of code. As utilized herein, “and/or” means any one or more of theitems in the list joined by “and/or.” As an example, “x and/or y” meansany element of the three-element set {(x), (y), (x, y)}. In other words,“x and/or y” means “one or both of x and y”. As another example, “x, y,and/or z” means any element of the seven-element set {(x), (y), (z), (x,y), (x, z), (y, z), (x, y, z)}. In other words, “x, y and/or z” means“one or more of x, y and z”. As utilized herein, the term “exemplary”means serving as a non-limiting example, instance, or illustration. Asutilized herein, the terms “e.g.” and “for example” set off lists of oneor more non-limiting examples, instances, or illustrations. As utilizedherein, circuitry is “operable” to perform a function whenever thecircuitry comprises the necessary hardware and code (if any isnecessary) to perform the function, regardless of whether performance ofthe function is disabled or not enabled (e.g., by a user-configurablesetting, factory trim, etc.).

What are claimed:
 1. A method for using a distributed storage system,comprising: managing data in a plurality of clusters, wherein each ofthe plurality of clusters comprises buckets, and each of the buckets isdistributed across a plurality of storage nodes; and transferring datato or from each of the buckets using at least one processor of aplurality of processors, wherein each of the plurality of processors isconfigured to manage data transfer to or from each of the buckets. 2.The method of claim 1, wherein each of the buckets is distributed acrossfive storage nodes.
 3. The method of claim 1, comprising taking asnapshot by a first processor of the plurality of processors, in a firstcluster of the plurality of clusters, of a first bucket of the firstcluster of the plurality of clusters.
 4. The method of claim 3, wherein,prior to the first processor taking the snapshot, halting data transferto all storage nodes in the plurality of clusters.
 5. The method ofclaim 3, comprising, prior to taking the snapshot, sending a command totake a snapshot to the plurality of clusters.
 6. The method of claim 3,comprising distributing dirty extents to others of the plurality ofclusters.
 7. The method of claim 6, wherein the dirty extents compriseinformation regarding the snapshot to other clusters of the plurality ofclusters, wherein the information can be logged by the other clusters tokeep track of the snapshot.
 8. The method of claim 6, comprising storingthe snapshot by the first processor to one or more storage nodes of theplurality of storage nodes in the first cluster.
 9. The method of claim8, wherein the one or more storage nodes are associated with the firstbucket, and the first bucket is managed by the first processor.
 10. Themethod of claim 8, comprising, prior to storing the snapshot, verifyingby the first processor that no other bucket in any of the plurality ofclusters holds any dirty cluster information associated with an extentof the snapshot.
 11. The method of claim 1, comprising, when writing bya first processor of the plurality of processors in a first cluster to asecond cluster in the plurality of clusters, sending extents affected bythe write to other clusters of the plurality of clusters to provide acoherent view to all clusters of the plurality of clusters.
 12. Themethod of claim 1, comprising, prior to transferring the data to one ofthe buckets, requesting by a first processor of the plurality ofprocessors, in a first cluster of the plurality of clusters, a lease toopen a file in a first bucket of the buckets for at least writeprivilege for the file.
 13. The method of claim 12, comprisingrequesting by the first processor a respective lease from each of theplurality of clusters when the file to be opened is in a second clusterof the plurality of clusters.
 14. The method of claim 12, comprising,relinquishing the lease to close the open file, and transmitting extentsassociated with the closed file to other clusters of the plurality ofclusters.
 15. The method of claim 14, wherein each of the other clustersupdates their extents with the transmitted extents such that the closedfile can be read locally.
 16. The method of claim 14, wherein thetransmitting is done in the background.
 17. The method of claim 14,comprising blocking access to the closed file until the transmitting isdone.
 18. The method of claim 12, comprising, when there is a leaserequest from more than one cluster, selecting a cluster to provide thelease to based on one or both of: a first lease request and a number ofopened files by each of the plurality of clusters.
 19. A distributedstorage system comprising: a plurality of clusters, wherein each of theplurality of clusters comprises buckets, and each of the buckets isdistributed across a plurality of storage nodes; and a plurality ofprocessors in each of the clusters, wherein each of the plurality ofprocessors is configured to manage data transfer to or from each of thebuckets.
 20. The system of claim 19, wherein each of the buckets isdistributed across five storage nodes.
 21. The system of claim 19,wherein a first processor of the plurality of processors, in a firstcluster of the plurality of clusters, is configured to request a leaseto open a file for at least write privilege for the file in a firstbucket of the buckets.
 22. The system of claim 19, wherein a firstprocessor of the plurality of processors, in a first cluster of theplurality of clusters, is configured to request a lease from each of theplurality of clusters when the file is in a second bucket in a secondcluster of the plurality of clusters.
 23. The system of claim 19,wherein a first processor of the plurality of processors, in a firstcluster of the plurality of clusters, is configured to take a snapshotof a first bucket of the first cluster.
 24. The system of claim 23,wherein the first processor is configured to store the snapshot to oneor more storage nodes of the plurality of storage nodes in the firstcluster.
 25. The system of claim 24, wherein the one or more storagenodes are associated with the first bucket.
 26. The system of claim 23,wherein prior to the first processor taking the snapshot, data transferis halted to all storage nodes in the plurality of clusters.